package com.fxpc.config;

import javax.net.ssl.X509TrustManager;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

/**
 * @Author Zyl
 * @Date 2021/3/19 15:51
 * @Version 1.0
 * @Describe:
 */
public class MyX509TrustManager implements X509TrustManager {

    /**
     * The default X509TrustManager returned by SunX509.
     * We'll delegate decisions to it, and fall back to the logic in this class
     * if the default X509TrustManager doesn't trust it.
     * 由SunX509返回的默认 X509TrustManager，我们将把决定委托给它，如果默认的X509TrustManager不信任它，则退回到该类中的逻辑
     */


    @Override
    public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {

    }

    @Override
    public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {

    }

    @Override
    public X509Certificate[] getAcceptedIssuers() {
        return new X509Certificate[0];
    }
}
